<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小规模安全生产法人单位基础信息</title>
    <link rel="stylesheet" type="text/css" href="/css/street/street.css"/>
    <link rel="stylesheet" href="/css/officialDocument/officialDocument.css">
    <link rel="stylesheet" href="/lib/pagination/style/pagination.css">
    <link rel="stylesheet" href="/lib/laydate/need/laydate.css">
    <link rel="stylesheet" href="/css/base.css">
    <script src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.fileupload.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layer/layer.js?20201106" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/tablePage.js"></script>
    <script src="/lib/laydate/laydate.js"></script>
    <script src="/lib/jquery.form.min.js"></script>
    <style>
        .header {
            background-color: #f7f7f7;
        }
        .header {
            height: 45px;
            border-bottom: #999 1px solid;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            padding-left: 20px;
            width: 100%;
            background-color: #fff;
            z-index: 99999;
        }
        .M-box .active, .M-box1 .active, .M-box2 .active, .M-box3 .active {
            background: #2f80d1!important;
            border: 1px solid #2b7fe0!important;
            margin: 0 3px!important;
            width: 29px!important;
            height: 29px!important;
            line-height: 29px!important;
            font-size: 12px!important;
        }
        .jump-ipt {
            margin: 0 3px;
            width: 28px;
            height: 26px;
            line-height: 26px;
            font-size: 12px;
        }
        .M-box a, .M-box1 a, .M-box2 a, .M-box3 a {
            margin: 0 3px!important;
            width: 29px!important;
            height: 29px!important;
            line-height: 29px!important;
            font-size: 12px!important;
        }
        td a:first-child{
            margin-right: 10px;
        }
        body{
            background-color: #f7f7f7;
        }
        .header{
            background-color: #f7f7f7;
        }
        .formHead{
            height: 40px;
        }
        .formHead span{
            line-height:40px;
        }
        .formbox{
            border: 1px solid #dedede;
            width: 900px;
            background-color: #fff;
            margin: 0 auto;
            border-radius: 2px;
            padding: 0 20px;
            padding-bottom: 10px;
        }
        .spans1{
            height: 20px;
            border-left: 7px solid #2b7ee0;
            margin-right: 5px;
            display: inline-block;
            position: absolute;
            top: 11px;
        }
        .span1title{
            height: 40px;
            display: inline-block;
            font-size: 18px;
            margin-left: 15px;
            font-weight: 600;
            color: #151515;
        }
        .secondtitle{
            height: 40px;
            line-height: 40px;
            margin-top: 15px;
            position: relative;
            z-index: 998;
        }
        .secondtitlespan{
            position: absolute;
            z-index: 99999;
            font-size: 16px;
            color: #2b7ee0;
            font-weight: 600;
            background-color: #fff;
        }
        .line{
            width: 100%;
            height: 20px;
            border-bottom: 1px dashed #ccc;
            position: relative;
            z-index: 900;
        }
        .formbox td{
            position: relative;
            height: 40px;
            line-height: 40px;
            font-size: 12px;
            color: #424242;
            font-weight: 600;
            padding: 5px 10px;
            text-align: right;
        }
        .longText{
            width: 100%;
            border: 1px solid #d6d6d6;
            background-color: #f7f7f7;
            -webkit-border-radius: 6px;
            -moz-border-radius:6px;
            border-radius:6px;
            text-indent: 10px;
        }
        .longText1{
            width:220px;
        }
        .selectbox{
            text-indent: 10px;
            width: 100%;
            border: 1px solid #d6d6d6;
            background-color: #f7f7f7;
            -webkit-border-radius: 6px;
            -moz-border-radius:6px;
            border-radius:6px;
        }
        .dwbtn{
            position: absolute;
            width: 60px;
            height: 30px;
            background-color: #228cdc;
            color: #fff;
            right: 0px;
            border-radius: 3px;
            cursor: pointer;
            top: 11px;
        }
        .lastbtn{
            width: 100px;
            height: 30px;
            background-color: #228cdc;
            color: #fff;
            border-radius: 5px;
            cursor: pointer;
        }
        .img_box{
            font-weight: 500;
        }
        .longspan{
            line-height: 25px;
            display: inline-block;
        }
        .longspan1{
            line-height: 20px;
            display: inline-block;
        }
        .num1,.num2{
            display: none;
        }
        select{
            height: 30px;
        }
        .inputcheck{
            float: left;
            width: 60px;
            height: 30px;
            line-height:30px;
        }
        .inputcheck input{
            height: 30px;
        }
        .inputcheck span{
            margin-right: 10px;
        }
    </style>
</head>
<body>
<div class="header">
    <img src="/img/icon_unitManagement.png" class="fl" style="margin-top: 7px;">
    <div class="headertitle"> 企业信息</div>
</div>
<div class="mainDatas" style="margin-top: 65px;margin-bottom: 45px;" data-id="0">
    <form action="/sv1/smallscalesecurityunit/insertSelective" class="formbox" method="post">
        <div class="formHead" style="border-bottom: 1px solid #d6d6d6;position:relative;">
            <span class="spans1"></span>
            <span class="span1title">小规模安全生产法人单位基础信息</span>
            <span class="tbsj" style="float:right;margin-left: 10px;margin-right: 20px;"></span>
            <input type="hidden" name="tbsj">
            <span class="lxdh" style="float:right;margin-left: 10px;"></span>
            <input type="hidden" name="lxdh">
            <span class="tbr" style="float:right;"></span>
            <input type="hidden" name="tbr">
        </div>

        <div class="firstbox">
            <div class="secondtitle">
                <span class="secondtitlespan">&nbsp;&nbsp;&nbsp;&nbsp;详细信息&nbsp;&nbsp;</span>
                <div class="line"></div>
            </div>
            <table style="border-collapse: initial;padding: 0 40px;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <span>组织机构代码：</span>
                        </td>
                        <td style="width: 220px;">
                            <input type="text" class="longText" name="organizationCode">
                        </td>
                        <td style="width: 150px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 60px;">
                            <span>单位详细名称：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="unitName">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 85px;">
                            <span>企业坐标：</span>
                        </td>
                        <td style="width: 220px;">
                            <input type="text" class="longText" readonly="readonly" name="enterpriseCoordinate">
                            <button class="dwbtn" type="button">点击定位</button>
                        </td>
                        <td style="width: 150px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 85px;">
                            <span>企业状态：</span>
                        </td>
                        <td>
                            <select name="enterpriseState" class="selectbox"><option value="0">请选择</option><option value="01">合格达标</option><option value="02">一般隐患</option><option value="03">突出隐患</option><option value="04">重大隐患</option></select>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 85px;">
                            <span>所属社区：</span>
                        </td>
                        <td>
                            <select name="gridCode" id="grid" class="selectbox"></select>
                        </td>
                        <td colspan="2">

                        </td>
                    </tr>
                </tbody>
            </table>
            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td colspan="2" style="text-align: left;padding-left: 5px;font-size: 15px;color: #2b7ee0;">行业类别：</td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">主要业务活动(或主要产品)：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="mainBusinessOrProduct" class="selectbox" style="width: 226px;"><option value="0">请选择</option><option value="01">易燃易爆物品生产经营</option><option value="02">危险化学品或易制毒化学品生产经营、运输、储存企业</option><option value="03">食品饮料生产经营</option><option value="04">乳制品生产经营</option><option value="05">屠宰、肉类加工</option><option value="06">非煤矿山开采</option><option value="07">互联网上网服务场所、营业性网站、声讯服务业</option><option value="08">公共聚集场所经营（餐馆、酒店、宾馆/旅店/足浴、洗浴、按摩场所/美容、理发）</option><option value="09">娱乐服务（歌舞厅、演艺厅、影视厅、电子游戏、棋牌）</option><option value="10">营利性医疗机构/药品、医疗器械生产经营</option><option value="11">种子、农药、化肥生产经营</option><option value="12">卫星地面接收设施生产、安装</option><option value="13">印刷与复印</option><option value="14">图书报刊及音像制品经营</option><option value="15">房地产/房地产经纪/建筑施工/室内装饰装修</option><option value="16">公共交通、运输服务业</option><option value="17">机动车改装、维修及零配件生产</option><option value="18">金融、证券及保险</option><option value="19">其他</option></select>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">行业类别代码(GB/T 4754-2011)：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="industryCategoryCode">
                        </td>
                    </tr>

                    <tr>
                        <td colspan="2" style="text-align: left;padding-left: 5px;font-size: 15px;color: #2b7ee0;">单位所在地及区划：</td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">区(县)乡(镇)街(村)门牌号：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="unitLocationArea">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">单位位于(街道办事处社区或居委会)：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="unitSubdistrictOffice">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="text-align: left;padding-left: 5px;font-size: 15px;color: #2b7ee0;">单位注册地及区划：</td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan1">省(自治区、直辖市)地(区、市、州、盟)县(区、市、旗)：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="unitRegistrationPlaceProvince">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span>乡(镇)街(村)门牌号：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="unitRegistrationPlaceHouseNumber">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">注册地位于(街道办事处社区或居委会)：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="registrationSubdistrictOffice">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">从业人员期末人数：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="number2011">
                        </td>
                    </tr>
                </tbody>
            </table>

            <table style="border-collapse: initial;padding: 0 40px;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 5px;">
                            <span  class="longspan">法定代表人(单位负责人)：</span>
                        </td>
                        <td style="width: 220px;">
                            <input type="text" class="longText" name="legalRepresentative">
                        </td>
                        <td style="width: 150px;">
                            <span>开业(成立)时间：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="establishmentTime" readonly="readonly"  onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span>固定电话：</span>
                        </td>
                        <td style="width: 220px;">
                            <input type="text" class="longText" name="fixedTelephone">
                        </td>
                        <td style="width: 150px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 85px;">
                            <span>移动电话：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="mobilePhone">                            </td>
                    </tr>
                </tbody>
            </table>

            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">工商登记注册号：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="businessRegistrationNo">
                        </td>
                    </tr>
                </tbody>
            </table>

            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 180px;">
                            <span class="longspan">营业状态：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="businessStatus" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">营业</option>
                                <option value="2">停业(歇业)</option>
                                <option value="3">关闭</option>
                            </select>
                        </td>
                        <td style="width: 166px;">
                            <img src="../img/mg2.png" alt="" style="position: absolute;top: 20px;left: 75px;">
                            <span class="longspan">企业特性：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="enterpriseCharacteristics" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">加工</option>
                                <option value="2">餐饮</option>
                                <option value="3">旅馆</option>
                                <option value="4">仓储</option>
                                <option value="5">娱乐</option>
                                <option value="6">商店（超市）</option>
                                <option value="7">服装</option>
                                <option value="8">复印</option>
                                <option value="9">机修</option>
                                <option value="10">建材</option>
                                <option value="11">网吧</option>
                                <option value="12">办公服务类</option>
                                <option value="13">再生资源回收利用</option>
                                <option value="14">其他</option>
                            </select>
                        </td>
                    </tr>

                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">地上建构筑物面积：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="aboveGroundArea">
                        </td>
                        <td style="width: 150px;">
                            <span class="longspan">地下建构筑物面积：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="undergroundArea">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">地下面积用途：</span>
                        </td>
                        <td>
                            <input type="text" class="longText" name="undergroundAreaUse">
                        </td>
                    </tr>
                </tbody>
            </table>

            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">专业检测：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="architectureFireControlTesting" class="selectbox selectbox2" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">建筑消防设施检测最近一次检测时间</option>
                                <option value="2">电气防火技术检测最近一次检测时间</option>
                                <option value="3">防雷装置检测最近一次检测时间</option>
                                <option value="4">其他最近一次检测时间</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="jcsj" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">最近一次检测时间：</span>
                        </td>
                        <td>
                            <input type="text" class="longText longText1" name="unitLocationVillage" readonly="readonly" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">是否涉及危险化学品：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="hazardousChemicalsInvolved" class="selectbox" style="width: 226px;"><option value="0">请选择</option><option value="1">是</option><option value="2">否</option></select>
                        </td>
                    </tr>

                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">是否涉及有限空间作业：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="operationsInvolvingFiniteSpaces" class="selectbox selectbox4" style="width: 226px;"><option value="0">请选择</option><option value="1">是</option><option value="2">否</option></select>
                        </td>
                    </tr>
                    <tr class="yxkj" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">有限空间作业持证人数：</span>
                        </td>
                        <td style="text-align: left;">
                            <input type="text" name="limitedPeopleNumber" class="longText longText1 yxkjczrs">
                        </td>
                    </tr>

                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">是否涉及金属焊接切割作业：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="metalWeldingOperation" class="selectbox selectbox5" style="width: 226px;"><option value="0">请选择</option><option value="1">是</option><option value="2">否</option></select>
                        </td>
                    </tr>
                    <tr class="jshj" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">金属焊接切割作业持证人数：</span>
                        </td>
                        <td style="text-align: left;">
                            <input type="text" name="metalWeldingPeopleNumber" class="longText longText1 jshjrs">
                        </td>
                    </tr>

                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">是否涉及特种设备：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="specialEquipment" class="selectbox selectbox6" style="width: 226px;"><option value="0">请选择</option><option value="1">是</option><option value="2">否</option></select>
                        </td>
                    </tr>
                    <tr class="tzsb" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">特种设备类型及数量：</span>
                        </td>
                        <td style="text-align: left;">
                            <input type="text" name="specialEquipmentTypeName" class="longText longText1 tzsblx">
                        </td>
                    </tr>
                </tbody>
            </table>
            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">是否通过小微企业岗位达标评审：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="complianceAssessment" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">是</option>
                                <option value="2">否</option>
                            </select>
                        </td>
                        <td style="width: 150px;">
                            <span class="longspan">具备的消防设备：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="fireFightingEquipment" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">灭火器</option>
                                <option value="2">消火栓</option>
                                <option value="3">喷淋</option>
                                <option value="4">烟感</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">是否有持证电工：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="certifiedElectrician" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">是</option>
                                <option value="2">否</option>
                            </select>
                        </td>
                        <td style="width: 150px;">
                            <span class="longspan">电工是否外聘：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="electriciansExternal" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">是</option>
                                <option value="2">否</option>
                            </select>
                        </td>
                    </tr>
                </tbody>
            </table>

            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">有无安全生产许可：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="safeProductionLicense" class="selectbox selectbox7" style="width: 226px;"><option value="0">请选择</option><option value="1">有</option><option value="2">无</option></select>
                        </td>
                    </tr>
                    <tr class="aqsc" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">许可名称：</span>
                        </td>
                        <td>
                            <input type="text" name="licenseName" class="longText longText1 xkmc">
                        </td>
                    </tr>

                    <tr>
                        <td style="width: 150px;">
                            <span class="longspan">有无行业资质：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="industryQualification" class="selectbox selectbox8" style="width: 226px;"><option value="0">请选择</option><option value="1">有</option><option value="2">无</option></select>
                        </td>
                    </tr>
                    <tr class="hyzz" style="display: none;">
                        <td style="width: 150px;">
                            <span class="longspan">资质名称：</span>
                        </td>
                        <td>
                            <input type="text" name="qualificationName" class="longText longText1 zzmc">
                        </td>
                    </tr>
                </tbody>
            </table>


            <table class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">用气类型：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="unitRegistrationPlaceLand" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">天然气管道</option>
                                <option value="2">液化石油气钢瓶</option>
                                <option value="3">其他</option>
                            </select>
                        </td>
                        <td style="width: 150px;">
                            <span class="longspan">燃气或液化石油气使用场所安全设施：</span>
                        </td>
                        <td style="text-align: left;">
                            <select name="safetyFacilities" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">灭火器</option>
                                <option value="2">灭火毯</option>
                                <option value="3">防爆灯</option>
                                <option value="4">可燃气体报警器</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">中餐操作间排油烟管道清洗周期：</span>
                        </td>
                        <td colspan="3">
                            <input type="text" name="cleaningCycle" class="longText longText1 zzmc">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">液化气存瓶数量（包括使用和储存）：</span>
                        </td>
                        <td style="text-align: left;" colspan="3">
                            <select name="gasCylindersNumber1" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">2.5kg气瓶个</option>
                                <option value="2">15kg气瓶个</option>
                                <option value="3">50kg气瓶个</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">是否与燃气供应单位签订供气合同：</span>
                        </td>
                        <td style="text-align: left;" colspan="3">
                            <select name="gasSupplyContract" class="selectbox selectbox9" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">是</option>
                                <option value="2">否</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="rqgy" style="display: none;">
                        <td style="width: 166px;">
                            <span class="longspan">燃气供应单位名称：</span>
                        </td>
                        <td style="text-align: left;" colspan="3">
                            <input type="text" name="gasSupplyUnitName" class="longText longText1 rqgydw">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px;">
                            <span class="longspan">液化石油气气瓶间设施：</span>
                        </td>
                        <td style="text-align: left;" colspan="3">
                            <select name="lpgGasStorageFacilities" class="selectbox" style="width: 226px;">
                                <option value="0">请选择</option>
                                <option value="1">可燃气体报警装置</option>
                                <option value="2">非防爆排风扇</option>
                                <option value="3">防爆排风扇</option>
                                <option value="4">普通照明灯</option>
                                <option value="5">防爆灯</option>
                            </select>
                        </td>
                    </tr>

                </tbody>
            </table>

            <table  class="impbox" style="padding: 0 40px;border-collapse: initial;">
                <tbody>
                    <tr>
                        <td style="width: 150px;">
                            <span>备注：</span>
                        </td>
                        <td style="padding-top: 12px;">
                            <textarea name="remarks" class="longText" style="padding-top: 5px;height: 60px;"></textarea>
                        </td>
                    </tr>
                    <tr style="border: none;">
                        <td style="width: 150px;">
                            <span style="line-height: 30px;display: inline-block;">营业执照附件：</span>
                        </td>
                        <td style="text-align: left;" colspan="3">
                            <input data-url="/upload?module=grid" type="file" multiple="multiple" name="file" id="uploadinputimgs" class="w-icon5" style="position: absolute;opacity: 0;width: 70px;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)">
                            <a href="#" id="uploadimgs"><img style="margin-right:5px;" src="../img/icon_uplod.png">添加附件</a>
                            <div class="img_box"></div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div style="width: 100%;height: 50px;">
            <div style="width: 235px;margin: 0 auto;">
                <button class="lastbtn" id="savebtn" type="button" onclick="formsubmit($(this))">保存</button>
                <button class="lastbtn" style="margin-left: 30px;background-color: #95aabe" id="closebtn" type="button" onclick="closebtns($(this))">返回</button>
            </div>
        </div>
    </form>
</div>

<script>
    var objtwo=$.GetRequest();
//    var tbr = decodeURI(objtwo.tbr);
//    var tbsj = decodeURI(objtwo.tbsj);
//    var lxdh = decodeURI(objtwo.lxdh);
    var types = decodeURI(objtwo.types);
    var fixFromId = decodeURI(objtwo.fixFromId);
    function getGrid(){
        $.get('/code/getCode?parentNo=TYPE_OF_ACCOUNT',function(res){
            var str ='<option value="">请选择</option>'
            var data = res.obj;
            for(var i=0;i<data.length;i++){
                str += '<option value="'+data[i].codeNo+'">'+data[i].codeName+'</option>'
            }
            $('#grid').html(str)

        })
    }
    $(function(){
        getGrid()
        $.get('/fixForm/getUserInfo',function(res) {
            var tbr = res.data.userName;
            var tbsj = new Date().Format('yyyy-MM-dd hh:mm:ss');
            var lxdh = res.data.mobilNo

            if(types == 'undefined'){
                $('.tbr').html('填表人：'+tbr);
                $('.tbsj').html('填表时间：'+tbsj);
                $('.lxdh').html('联系电话：'+lxdh);
                $('.formHead input[name=tbr]').val(tbr);
                $('.formHead input[name=tbsj]').val(tbsj);
                $('.formHead input[name=lxdh]').val(lxdh);
            }else{
                $('.formbox').attr('action','/sv1/smallscalesecurityunit/updateSelectiveById?smallScaleSecurityUnitId='+fixFromId);
                $.ajax({
                    url:'/fixForm/selectByListFixFromId?type=2&fixFromId='+fixFromId,
                    typeOf:'json',
                    data:{},
                    type:'get',
                    success:function(obj){
                        var data = obj.data;
                        $('.tbr').html('填表人：'+data.formHolder);
                        $('.tbsj').html('填表时间：'+data.dateOfPublication);
                        $('.lxdh').html('联系电话：'+data.unitLocationTown);
                        $('.formHead input[name=tbr]').val(data.formHolder);
                        $('.formHead input[name=tbsj]').val(data.dateOfPublication);
                        $('.formHead input[name=lxdh]').val(data.unitLocationTown);
                        $('input[name=organizationCode]').val(data.organizationCode);
                        $('input[name=unitName]').val(data.unitName);
                        $('input[name=enterpriseCoordinate]').val(data.enterpriseCoordinate);
                        $('select[name=enterpriseState]').val(data.enterpriseState);
                        $('select[name=mainBusinessOrProduct]').val(data.mainBusinessOrProduct);
                        $('input[name=industryCategoryCode]').val(data.industryCategoryCode);
                        $('input[name=unitLocationArea]').val(data.unitLocationArea);
                        $('input[name=unitSubdistrictOffice]').val(data.unitLocationArea);
                        $('input[name=unitRegistrationPlaceProvince]').val(data.unitRegistrationPlaceProvince);
                        $('input[name=unitRegistrationPlaceHouseNumber]').val(data.unitRegistrationPlaceHouseNumber);
                        $('input[name=unitRegistrationPlaceHouseNo]').val(data.unitRegistrationPlaceHouseNo);
                        $('input[name=registrationSubdistrictOffice]').val(data.registrationSubdistrictOffice);
                        $('input[name=number2011]').val(data.number2011);
                        $('input[name=legalRepresentative]').val(data.legalRepresentative);
                        $('input[name=establishmentTime]').val(data.establishmentTime);
                        $('input[name=fixedTelephone]').val(data.fixedTelephone);
                        $('input[name=mobilePhone]').val(data.mobilePhone);
                        $('input[name=businessRegistrationNo]').val(data.businessRegistrationNo);
                        $('select[name=businessStatus]').val(data.businessStatus);
                        $('select[name=enterpriseCharacteristics]').val(data.enterpriseCharacteristics);
                        $('input[name=aboveGroundArea]').val(data.aboveGroundArea);
                        $('input[name=undergroundArea]').val(data.undergroundArea);
                        $('input[name=undergroundAreaUse]').val(data.undergroundAreaUse);
                        $('select[name=architectureFireControlTesting]').val(data.architectureFireControlTesting);
                        if(data.architectureFireControlTesting == 1||data.architectureFireControlTesting == 2||data.architectureFireControlTesting == 3||data.architectureFireControlTesting == 4){
                            $('.jcsj').show();
                        }
                        $('#grid').val(data.gridCode)
                        $('input[name=unitLocationVillage]').val(data.unitLocationVillage);
                        $('select[name=hazardousChemicalsInvolved]').val(data.hazardousChemicalsInvolved);
                        $('select[name=operationsInvolvingFiniteSpaces]').val(data.operationsInvolvingFiniteSpaces);
                        if(data.operationsInvolvingFiniteSpaces == 1){
                            $('.yxkj').show();
                        }
                        $('input[name=limitedPeopleNumber]').val(data.limitedPeopleNumber);
                        $('select[name=metalWeldingOperation]').val(data.metalWeldingOperation);
                        $('input[name=metalWeldingPeopleNumber]').val(data.metalWeldingPeopleNumber);
                        $('select[name=specialEquipment]').val(data.specialEquipment);
                        if(data.specialEquipment == 1){
                            $('.tzsb').show();
                        }
                        $('input[name=specialEquipmentTypeName]').val(data.specialEquipmentTypeName);
                        $('select[name=complianceAssessment]').val(data.complianceAssessment);
                        $('select[name=fireFightingEquipment]').val(data.fireFightingEquipment);
                        $('select[name=certifiedElectrician]').val(data.certifiedElectrician);
                        $('select[name=electriciansExternal]').val(data.electriciansExternal);
                        $('select[name=safeProductionLicense]').val(data.safeProductionLicense);
                        if(data.safeProductionLicense == 1){
                            $('.aqsc').show();
                        }
                        $('input[name=licenseName]').val(data.licenseName);
                        $('select[name=industryQualification]').val(data.industryQualification);
                        if(data.industryQualification == 1){
                            $('.hyzz').show();
                        }
                        $('input[name=qualificationName]').val(data.qualificationName);
                        $('select[name=unitRegistrationPlaceLand]').val(data.unitRegistrationPlaceLand);
                        $('select[name=safetyFacilities]').val(data.safetyFacilities);
                        $('input[name=cleaningCycle]').val(data.cleaningCycle);
                        $('select[name=gasCylindersNumber1]').val(data.gasCylindersNumber1);
                        $('select[name=gasSupplyContract]').val(data.gasSupplyContract);
                        if(data.gasSupplyContract == 1){
                            $('.rqgy').show();
                        }
                        $('input[name=gasSupplyUnitName]').val(data.gasSupplyUnitName);
                        $('select[name=lpgGasStorageFacilities]').val(data.lpgGasStorageFacilities);
                        $('textarea[name="remarks"]').val(data.remarks);
                        var data = data.attachment;
                        var str = '';
                        for (var i = 0; i < data.length; i++) {
                            str += '<div class="dech" deUrl="' + encodeURI(data[i].attUrl)+ '"><input type="hidden" name="attachmentName" value="' + data[i].attachName + '*"><a href="<%=basePath %>download?'+encodeURI(data[i].attUrl)+'" NAME="' + data[i].attachName + '*"><img style="margin-right:10px;" src="../img/attachment_icon.png"/>' + data[i].attachName + '</a><img class="deImgs" style="margin-left:5px;cursor: pointer;" src="../img/file/icon_deletecha_03.png"/><input type="hidden" name="attachmentId" class="inHidden" value="' + data[i].aid + '@' + data[i].ym + '_' + data[i].attachId + ',"></div>';
                        }
                        $('.img_box').append(str);
                        if(types == 2){
                            $('input').attr('disabled','disabled');
                            $('select').attr('disabled','disabled');
                            $('textarea').attr('disabled','disabled');
                            $('#savebtn').remove();
                        }
                    }
                })
            }
        })



        $('.selectbox2').change(function(){
            var num = $('.selectbox2').val();
            if(num != ''){
                $('.jcsj input').val('');
                $('.jcsj').show();
            }else{
                $('.jcsj input').val('');
                $('.jcsj').hide();
            }
        })
        $('.selectbox4').change(function(){
            var num = $('.selectbox4').val();
            if(num == 1){
                $('.yxkj input').val('');
                $('.yxkj').show();
            }else{
                $('.yxkj input').val('');
                $('.yxkj').hide();
            }
        })
        $('.selectbox5').change(function(){
            var num = $('.selectbox5').val();
            if(num == 1){
                $('.jshj input').val('');
                $('.jshj').show();
            }else{
                $('.jshj input').val('');
                $('.jshj').hide();
            }
        })
        $('.selectbox6').change(function(){
            var num = $('.selectbox6').val();
            if(num == 1){
                $('.tzsb input').val('');
                $('.tzsb').show();
            }else{
                $('.tzsb input').val('');
                $('.tzsb').hide();
            }
        })
        $('.selectbox7').change(function(){
            var num = $('.selectbox7').val();
            if(num == 1){
                $('.aqsc input').val('');
                $('.aqsc').show();
            }else{
                $('.aqsc input').val('');
                $('.aqsc').hide();
            }
        })
        $('.selectbox8').change(function(){
            var num = $('.selectbox8').val();
            if(num == 1){
                $('.hyzz input').val('');
                $('.hyzz').show();
            }else{
                $('.hyzz input').val('');
                $('.hyzz').hide();
            }
        })
        $('.selectbox9').change(function(){
            var num = $('.selectbox9').val();
            if(num == 1){
                $('.rqgy input').val('');
                $('.rqgy').show();
            }else{
                $('.rqgy input').val('');
                $('.rqgy').hide();
            }
        })
        $('#uploadinputimgs').fileupload({
            dataType:'json',
            done: function (e, data) {
                if(data.result.obj != ''){
                    var data = data.result.obj;
                    var str = '';
                    for (var i = 0; i < data.length; i++) {
                        str += '<div class="dech" deUrl="' + encodeURI(data[i].attUrl)+ '"><input type="hidden" name="attachmentName" value="' + data[i].attachName + '*"><a href="<%=basePath %>download?'+encodeURI(data[i].attUrl)+'" NAME="' + data[i].attachName + '*"><img style="margin-right:10px;" src="../img/attachment_icon.png"/>' + data[i].attachName + '</a><img class="deImgs" style="margin-left:5px;cursor: pointer;" src="../img/file/icon_deletecha_03.png"/><input type="hidden" name="attachmentId" class="inHidden" value="' + data[i].aid + '@' + data[i].ym + '_' + data[i].attachId + ',"></div>';
                    }
                    $('.img_box').html(str);
                }else{
                    layer.alert('添加附件大小不能为空!',{},function(){
                        layer.closeAll();
                    });
                }
            }
        });
        //附件删除
        $('.img_box').on('click','.deImgs',function(){
            var data=$(this).parents('.dech').attr('deUrl');
            var dome=$(this).parents('.dech');
            deleteChatment(data,dome);
        })
        $('.dwbtn').click(function () {
//            window.open('/street/chooseMap')
            window.open('/street/mapCoordinates?type=4')
        })


    })
    //删除附件
    function deleteChatment(data,element){
        layer.confirm('<fmt:message code="workflow.th.que" />？', {
            btn: ['<fmt:message code="global.lang.ok" />','<fmt:message code="depatement.th.quxiao" />'], //按钮
            title:"<fmt:message code="notice.th.DeleteAttachment" />"
        }, function(){
            //确定删除，调接口
            $.ajax({
                type:'get',
                url:'../delete',
                dataType:'json',
                data:data,
                success:function(res){
                    if(res.flag == true){
                        layer.msg('<fmt:message code="workflow.th.delsucess" />', { icon:6});
                        element.remove();
                    }else{
                        layer.msg('<fmt:message code="lang.th.deleSucess" />', { icon:6});
                    }
                }
            });
        }, function(){
            layer.closeAll();
        });
    }
    function setZuobiao(str) {
        $('.mainDatas [name="enterpriseCoordinate"]').val(str)
    }
    function theEchozuobiaos(str) {
        $('.mainDatas1 [name="enterpriseCoordinate"]').val(str)
    }

    function formsubmit(e){
        var einfoName = $('input[name=unitName]').val();
        var einfoFix = $('input[name=enterpriseCoordinate]').val();
        var einfoDigest = $('select[name=enterpriseState] option:selected').val();
        var einfoStuts = $('select[name=enterpriseCharacteristics] option:selected').val();
        var einfoDelegatename = $('input[name=legalRepresentative]').val();
        var einfoMark = $('input[name=mobilePhone]').val();
        var grid = $('#grid').val();
        if(einfoName!=''&&einfoFix!=''&&einfoDigest!=''&&einfoStuts!=''&&einfoDelegatename!=''&&einfoMark!=''&&grid!=""){
            $('.formbox').ajaxSubmit({
                dataType:'json',
                success:function(data){
                    window.history.back(-1);
                }
            })
        }else{
            layer.msg("必填条件必须填写!",{icon:6});
        }
    }
    function closebtns(e){
        window.history.back(-1);
    }
</script>
</body>
</html>